package com.story.story_serve.mapper.Book;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.story.story_pojo.Book.BookCar;
import com.story.story_pojo.Book.BookCarList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * ClassName:  BookCarMapper
 * description:
 *
 * @ author:郭海龙
 * @ Create：2024/6/2 21:48
 * @ Version:1.0
 */
@Mapper
public interface BookCarMapper extends BaseMapper<BookCar> {

    @Select("select c_id, b_name, b_img, b_author from book_car a join book b on a.b_id = b.b_id where username = #{username}")
    List<BookCarList> getBookCarList(String username);
}
